package com.learning_paicoding.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * <p>
 * 评论表
 * </p>
 *
 * @author hph
 * @since 2025-07-06
 */
@Data
@Accessors(chain = true)
@TableName("comment")
@Schema(name = "Comment", description = "评论表")
public class Comment implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "文章ID")
    @TableField("article_id")
    private Long articleId;

    @Schema(description = "用户id")
    @TableField("user_id")
    private Long userId;

    @Schema(description = "评论内容")
    @TableField("content")
    private String content;

    @Schema(description = "顶级评论ID")
    @TableField("top_comment_id")
    private Integer topCommentId;

    @Schema(description = "父评论ID")
    @TableField("parent_comment_id")
    private Integer parentCommentId;

    @Schema(description = "是否删除")
    @TableField("deleted")
    private Byte deleted;

    @Schema(description = "创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @Schema(description = "最后更新时间")
    @TableField("update_time")
    private LocalDateTime updateTime;



}
